<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Yano Template Test</title>
{#
<style type="text/css" media="screen">
/* <![CDATA[ */
    body {font-family: arial, helvetica; padding:0 1em}
    th {text-align: left}
    th, td {padding: 5px}
    .tpl, .php {border-left:1px solid #ccc}
    td.tpl, td.php {font-family: monospace}
/* ]]> */
</style>
}
</head>
<body>

<h1>Hello {?{name}:='world'}!</h1>
<p>
    <form action="{=|{url}}" method="post">
    <label for="name">Enter your name: </label><input type="text" name="name" id="name" />
    <input type="submit" /><br />
    <small>Try entering HTML tags</small>
    </form>
</p>
<hr />
{:$paths = |{getScriptPaths}}
{:$script = $paths[0] . 'test/tpltest.phtml' | str_replace ['\\', '/'] '/' %}
{:$viewPath = $paths[0] | strrpos DIRECTORY_SEPARATOR -2 | substr $paths[0] 0 %}
{:$template = $viewPath . '/templates/test/tpltest.phtml' | str_replace ['\\', '/'] '/' %}
<p>
This page was generated by the template compiler. This will not be recompiled unless
you delete <tt>{$script}</tt> or edit <tt>{$template}</tt>.
</p>
<p>
Last compiled on: <em>{= $script | filemtime | date 'r' %}</em>
</p>
<h2>Compile tests:</h2>
{:$compiler = new Yano_Template_Engine()}
<table cellspacing="0">
    <tr>
        <th>Replacement Type</th>
        <th class="tpl">Template Code</th>
        <th class="php">PHP Code Output</th>
    </tr>
<?php foreach ($this->examples as $desc => $code) : ?>
    <tr>
        <td>{$desc}</td>
        <td class="tpl">{$code | nl2br}</td>
        <td class="php">{$code | {$compiler.compile} | nl2br}</td>
    </tr>
<?php endforeach; ?>
</table>

</body>
<html>